<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>"/>
  <title>当当网购物车页面</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/shopping.js"></script>
<script type="text/javascript" src="js/jquery-1.4.3.js"></script>
</head>

<body>
<div id="header"><iframe src="common/header.jsp" height="250px" width="960px" frameborder="0"></iframe></div>
<!--中间部分开始-->
<div id="main">
  <!--为您推荐商品开始-->
  <div class="shopping_commend">
     <div class="shopping_commend_left">根据您挑选的商品，当当为您推荐</div>
     <div class="shopping_commend_right"><img src="images/shopping_arrow_up.gif" alt="shopping" id="shopping_commend_arrow" onclick="shopping_commend_show()"/></div>
  </div>
  <div id="shopping_commend_sort">
   <div class="shopping_commend_sort_left">
    <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">JavaScript DOM编程艺术</a></li>
      <li class="shopping_commend_list_2">￥39.00</li>
      <li class="shopping_commend_list_3">￥29.30</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
     <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">解禁（当当网独家首发）</a></li>
      <li class="shopping_commend_list_2">￥28.00</li>
      <li class="shopping_commend_list_3">￥19.40</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
     <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">地王之王（金融危机下房地产行...</a></li>
      <li class="shopping_commend_list_2">￥32.80</li>
      <li class="shopping_commend_list_3">￥25.10</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
     <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">逃庄</a></li>
      <li class="shopping_commend_list_2">￥36.00</li>
      <li class="shopping_commend_list_3">￥27.70</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
   </div>
   <div class="shopping_commend_sort_mid"></div>
   <div class="shopping_commend_sort_left">
     <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">深入浅出MySQL数据库开发、优...</a></li>
      <li class="shopping_commend_list_2">￥59.00</li>
      <li class="shopping_commend_list_3">￥47.20</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
     <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">大玩家（马未都、王刚推荐!央...</a></li>
      <li class="shopping_commend_list_2">￥34.80</li>
      <li class="shopping_commend_list_3">￥20.60</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
     <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">都市风水师--官场风水小说：一...</a></li>
      <li class="shopping_commend_list_2">￥39.80</li>
      <li class="shopping_commend_list_3">￥30.50</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
     <ul>
      <li class="shopping_commend_list_1">・<a href="#" class="blue">国戏（以麻将术语解读宦海沉浮...</a></li>
      <li class="shopping_commend_list_2">￥25.00</li>
      <li class="shopping_commend_list_3">￥17.30</li>
      <li class="shopping_commend_list_4"><a href="#" class="shopping_yellow">购买</a></li>
    </ul>
    </div>
  </div>
   
<div class="shopping_list_top">您已选购以下商品</div>
  <div class="shopping_list_border">

     <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr class="shopping_list_title">
       <td class="shopping_list_title_1">商品名</td>
       <td class="shopping_list_title_3">市场价</td>
       <td class="shopping_list_title_4">当当价</td>
       <td class="shopping_list_title_5" colspan="3">数量</td>
       <td class="shopping_list_title_6">删除</td>
    </tr>
    </table>
     <table width="100%" border="0" cellspacing="0" cellpadding="0" id="myTableProduct">
     <s:iterator value="#session.cart.items">
	   <tr class="shopping_product_list" id="shoppingProduct_0"+<s:property value='book.id'/>>
	       <td class="shopping_product_list_1"><a href="mainAction!bookInfo?book.id=<s:property value="book.id"/>" class="blue"><s:property value="book.ProductName"/></a></td>
	       <td class="shopping_product_list_3">￥<label><s:property value="book.fixedPrice"/></label></td>
	       <td class="shopping_product_list_4">￥<label><s:property value="book.dangPrice"/> </label>(<s:property value="book.dangPrice/book.fixedPrice*100"/>折)</td>
	       <td class="shopping_product_list_5">&nbsp;&nbsp;<s:property value="qty"/></td>
	       <td class="shopping_product_list_6"><input type="text" id="b0_<s:property value='book.id'/>"/></td>
	       <td class="shopping_product_list_6"><a href="javascript:;" style="color:blue;" onclick="f1(<s:property value='book.id'/>,document.getElementById('b0_<s:property value='book.id'/>').value);">修改数量</a></td>
	       <td class="shopping_product_list_6"><a href="cart/cartAction!deleteCartItem?book.id=<s:property value='book.id'/>" class="blue">删除</a></td>
	   </tr>
   </s:iterator>
    </table>   
     <div class="shopping_list_end">
      <ul>
<%--      结算--%>
       <li class="shopping_list_end_1"><input name="" type="image" src="images/shopping_balance.gif" onclick="pay();"/></li>
       <li class="shopping_list_end_3">商品金额总计：￥<s:property value="#session.dangSum"/></li>
       <li style="font-size:14px;font-weight:bold;position:relative;top:15px;">您共节省金额:￥<s:property value="#session.fixedSum-#session.dangSum"/>|<label class="shopping_list_end_yellow" id="product_save"></label><br/>
	   </li>
       </ul>
    </div>
  </div>
</div>

<!--网站版权部分开始-->
<div id="footer">
<iframe src="common/footer.jsp" height="50px" width="900px" frameborder="0"></iframe>
</div>
</body>
</html>
